package interfaces.app.commands;

import exceptions.CommandException;
import interfaces.app.IProcess;

/**
 * Interface for commands of a shell.
 * <br/>
 * Created: 11.10.11
 *
 * @author Martin Štulc (<a href="mailto:martin.stulc@gmail.com">martin.stulc@gmail.com</a>)
 * @version 1.0
 */
public interface ICommand extends IProcess
{
    /**
     * Return a command name. (must be the same like class name)
     *
     * @return the command name
     */
    String getCommandName();

    /**
     * Main code of the command.
     *
     * @param args arguments of command
     * @throws CommandException Thrown if occurs an error during processing of the command.
     */
    void mainCommand(final String[] args) throws CommandException;
}
